import { LAYOUT } from '@/router/constant';

export default {
  path: '/stock',
  name: 'Stock',
  component: LAYOUT,

  meta: {
    title: '库存',
    hideBreadcrumb: true,
  },
  children: [
    {
      path: 'list',
      name: 'StockList',
      component: () => import('@/views/stock/list.vue'),
      meta: {
        title: '库存列表',
        showNav: true,
      },

      children: [
        {
          path: 'detail',
          name: 'StockDetail',
          component: () => import('@/views/stock/detail.vue'),
          meta: {
            title: '库存详情',
          },

          children: [
            {
              path: 'change-log',
              name: 'StockLog',
              component: () => import('@/views/stock/change-log.vue'),
              meta: {
                title: '变更日志',
              },
            },
          ],
        },

        {
          path: 'check',
          name: 'StockCheck',
          component: () => import('@/views/stock/check.vue'),
          meta: {
            title: '库存校正',
          },
        },

        {
          path: 'review',
          name: 'StockReview',
          component: () => import('@/views/stock/review.vue'),
          meta: {
            title: '盘点记录',
          },

          children: [
            {
              path: 'detail',
              name: 'StockReviewDetail',
              component: () => import('@/views/stock/review-detail.vue'),
              meta: {
                title: '盘点详情',
                keepAlive: true,
              },
            },
          ],
        },

        {
          path: 'out2',
          name: 'StockOut2',
          component: () => import('@/views/stock/out2.vue'),
          meta: {
            title: '指定商品出库',
          },
        },

        {
          path: 'out',
          name: 'StockOut',
          component: () => import('@/views/stock/out.vue'),
          meta: {
            title: '商品出库',
            keepAlive: true,
          },

          children: [
            {
              path: 'product',
              name: 'StockOutProduct',
              component: () => import('@/views/stock/out-product.vue'),
              meta: {
                title: '添加商品',
                keepAlive: true,
              },
            },
          ],
        },

        {
          path: 'in',
          name: 'StockIn',
          component: () => import('@/views/stock/in.vue'),
          meta: {
            title: '商品入库',
            keepAlive: true,
            hiddenOverflow: true,
          },

          children: [
            {
              path: 'product',
              name: 'StockInProduct',
              component: () => import('@/views/stock/in-product.vue'),
              meta: {
                title: '添加商品',
                keepAlive: true,
                hiddenOverflow: true,
              },
            },
          ],
        },
      ],
    },
  ],
};
